function [ subjectinfo ] = GetSubjectInfoObject( subjectcode )
%GETSUBJECTINFOOBJECT 
%   [ subjectinfo ] = GetSubjectInfoObject( subjectcode )

if ~(nargin==1); help GetElectrodesBySubject; error('Incorrect number of arguments'); end;

global Database;

cCode = strcmp(Database.subjects_header, 'Code');
rSubject = strcmp({Database.subjects{:,cCode}}, subjectcode);
if ~any(rSubject); error(['Subject ''' subject ''' not found']); end

cName = strcmp(Database.subjects_header, 'Name');
subjectinfo = SubjectInfo.Load(Database.subjects{rSubject, cName});

end

